package com.jgp.glmeeting.controller;

import com.jgp.glmeeting.model.Manager;
import com.jgp.glmeeting.service.ManagerService;
import com.jgp.sys.common.controller.JGPController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/glMeeting/managerController")
public class ManagerController extends JGPController {
    @Autowired
    private ManagerService managerService;


    //跳转到listManager页面
    @RequestMapping("/listManager")
    public String listManager(){
        return page("listManager");
    }

    //跳转到addMeetingManager页面
    @RequestMapping("/addManager")
    public String addManager(){
        return page("addManager");
    }


    //跳转到editMeetingManager页面  进行页面编辑
    @RequestMapping("/editManager/{id}")
    public String editManager(@PathVariable String id, Model model){
        Manager m=managerService.queryID(id);
        re(model,"editManager",m);
        return page("editManager");
    }


}
